package com.ia.equalization.logic;

public class EqualizationResult {

	private double frequency; // h(g)
	private double partialFrequency; // ai = h(g)A(g)
	private double sumA; // sum ai
	private int gRaw; // g'

	public EqualizationResult() {

	}

	public double getFrequency() {
		return frequency;
	}

	public void setFrequency(double frequency) {
		this.frequency = frequency;
	}

	public double getPartialFrequency() {
		return partialFrequency;
	}

	public void setPartialFrequency(double partialFrequency) {
		this.partialFrequency = partialFrequency;
	}

	public double getSumA() {
		return sumA;
	}

	public void setSumA(double sumA) {
		this.sumA = sumA;
	}

	public int getgRaw() {
		return gRaw;
	}

	public void setgRaw(double gRaw) {
		int num = roundUp(gRaw);
		this.gRaw = num;
	}

	private int roundUp(double number) {
		int res = 0;
		int aux = (int) number;
		
		if(number == aux)
			res = aux;
		else
			res = aux+1;		
		
		return res;
	}
}
